//package com.dunshan.member.config;
//
//import brave.baggage.BaggageField;
//import brave.baggage.CorrelationScopeConfig;
//import brave.context.slf4j.MDCScopeDecorator;
//import brave.propagation.CurrentTraceContext;
//import org.springframework.boot.autoconfigure.AutoConfigureBefore;
//import org.springframework.cloud.sleuth.autoconfig.TraceAutoConfiguration;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author .dunshan
// * @program: dunshan-pef
// * @description: 标识
// * @date 2021-11-10 23:18:15
// */
//@Configuration
//@AutoConfigureBefore(TraceAutoConfiguration.class)
//public class SleuthTagConfiguration {
//    protected static class TagPropagationConfiguration {
//        @Bean
//        CurrentTraceContext.ScopeDecorator mdcScopeDecorator() {
//            BaggageField flagField = BaggageField.create("dunshan");
//            return MDCScopeDecorator.newBuilder()
//                    .clear()
//                    .add(CorrelationScopeConfig.SingleCorrelationField.newBuilder(flagField)
//                            .flushOnUpdate()
//                            .build())
//                    .build();
//        }
//    }
//}
